﻿'Params
'artist (Required (unless mbid)] : The artist name
'lang (Optional) : The language to return the biography in, expressed as an ISO 639 alpha-2 code.
'api_key (Required) : A Last.fm API key.
'Auth
'This service does not require authentication. 

Public Structure TagGetInfoResponse
    Dim tag As Tag

End Structure

Public Class TagGetInfo
    Inherits BaseRequest
    Dim artist As String = ""
    Dim lang As String = ""

    Public xmlresponse As XDocument = Nothing

    Public Sub New(ByVal artist As String, ByVal lang As String)
        Me.artist = artist
        Me.lang = lang
    End Sub

    Public Sub sendRequest()
        InitializeMembers("tag.getInfo")

        AddMember("artist", artist, False)
        AddMember("lang", lang, False)
        AddMember("api_key", My.Settings.api_key, False)

        xmlresponse = sendPOSTResponse()
    End Sub

    Public Function getResponse() As TagGetInfoResponse
        Dim response As New TagGetInfoResponse
        Try
            response.tag = New Tag(xmlresponse.<lfm>.<Tag>)
        Catch ex As Exception
        End Try

        Return response
    End Function
End Class
